package com.pingan.internal.point.shopping.vo;

import com.pingan.internal.point.shopping.entity.Goods;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.util.Date;

/**
 * yanjun956 2019-01-29
 */
@Getter
@Setter
public class GoodsVo {

    private Long id;

    private String operator;

    //商品名称
    private String goodsName;
    //商品价格
    private BigDecimal goodsPrice;
    private int goodsPoints;
    private String goodsSn;
    //商品数量
    private int goodsQuantity;
    //商品标签
    private String goodsTag;
    //是否为限制类型
    private boolean limitType;
    //每个会员限制数量
    private int limitCount;

    private String goodsImageName;

    //开始时间
    private Date beginTime;
    //结束时间
    private Date endTime;
    //是否展示
    private boolean showFlag;
    //内容
    private String content;
    //交换总数
    private int exchangeCount;
    //点击总数
    private int clickCount;

    public void build(Goods goods){
        this.id = goods.getId();

        this.operator=goods.getOperator();

        //商品名称
        this.goodsName=goods.getGoodsName();
        //商品价格
        this.goodsPoints=goods.getGoodsPoints();
        this.goodsSn=goods.getGoodsSn();
        //商品数量
        this.goodsQuantity=goods.getGoodsQuantity();
        //商品标签
        this.goodsTag=goods.getGoodsTag();
        //是否为限制类型
        this.limitType=goods.getLimitType();
        //每个会员限制数量
        this.limitCount=goods.getLimitCount();

        //开始时间
        this.beginTime=goods.getBeginTime();
        //结束时间
        this.endTime=goods.getEndTime();
        //是否展示
        this.showFlag=goods.getShowFlag();
        //内容
        this.content=goods.getContent();
        //交换总数
        this.exchangeCount=goods.getExchangeCount();
        //点击总数
        this.clickCount=goods.getClickCount();

        this.goodsImageName =goods.getGoodsImageName();
    }

}
